/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : main.h
  * @brief          : Header for main.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2024 STMicroelectronics.
  * All rights reserved.
  *
  * This software is licensed under terms that can be found in the LICENSE file
  * in the root directory of this software component.
  * If no LICENSE file comes with this software, it is provided AS-IS.
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32f4xx_hal.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
#define STATUS2_Pin GPIO_PIN_13
#define STATUS2_GPIO_Port GPIOC
#define TDC_CS_Pin GPIO_PIN_14
#define TDC_CS_GPIO_Port GPIOC
#define STATUS_Pin GPIO_PIN_15
#define STATUS_GPIO_Port GPIOC
#define TDC_MCLK_Pin GPIO_PIN_0
#define TDC_MCLK_GPIO_Port GPIOA
#define PPS_OUT_Pin GPIO_PIN_1
#define PPS_OUT_GPIO_Port GPIOA
#define STOP_Pin GPIO_PIN_2
#define STOP_GPIO_Port GPIOA
#define LCD_CS_Pin GPIO_PIN_3
#define LCD_CS_GPIO_Port GPIOA
#define LCD_A0_Pin GPIO_PIN_4
#define LCD_A0_GPIO_Port GPIOA
#define SPI_SCK_Pin GPIO_PIN_5
#define SPI_SCK_GPIO_Port GPIOA
#define SPI_MISO_Pin GPIO_PIN_6
#define SPI_MISO_GPIO_Port GPIOA
#define SPI_MOSI_Pin GPIO_PIN_7
#define SPI_MOSI_GPIO_Port GPIOA
#define LCD_RST_Pin GPIO_PIN_0
#define LCD_RST_GPIO_Port GPIOB
#define FLASH_CS_Pin GPIO_PIN_1
#define FLASH_CS_GPIO_Port GPIOB
#define KEY1_Pin GPIO_PIN_2
#define KEY1_GPIO_Port GPIOB
#define KEY2_Pin GPIO_PIN_10
#define KEY2_GPIO_Port GPIOB
#define E11_A_Pin GPIO_PIN_12
#define E11_A_GPIO_Port GPIOB
#define E11_B_Pin GPIO_PIN_13
#define E11_B_GPIO_Port GPIOB
#define E11_KEY_Pin GPIO_PIN_14
#define E11_KEY_GPIO_Port GPIOB
#define TP_IN_Pin GPIO_PIN_15
#define TP_IN_GPIO_Port GPIOB
#define PWM_H_Pin GPIO_PIN_8
#define PWM_H_GPIO_Port GPIOA
#define LOCK_Pin GPIO_PIN_15
#define LOCK_GPIO_Port GPIOA
#define TDC_INT_Pin GPIO_PIN_3
#define TDC_INT_GPIO_Port GPIOB
#define PWM_L_Pin GPIO_PIN_4
#define PWM_L_GPIO_Port GPIOB
#define TDC_SO_Pin GPIO_PIN_5
#define TDC_SO_GPIO_Port GPIOB
#define TDC_SI_Pin GPIO_PIN_8
#define TDC_SI_GPIO_Port GPIOB
#define TDC_SCK_Pin GPIO_PIN_9
#define TDC_SCK_GPIO_Port GPIOB

/* USER CODE BEGIN Private defines */
//for old board
#define DISCHARGE_Pin GPIO_PIN_5
#define DISCHARGE_GPIO_Port GPIOB
/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
